﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.PH5_2103A.Shopping.TEntityFrame.IRepository
{
    /// <summary>
    /// R《Read》：读操作仓储接口
    /// </summary>
    public interface IReadRepository<TEntity> where TEntity : class
    {
        /// <summary>
        /// 查询所有数据
        /// </summary>
        /// <returns></returns>
        IQueryable<TEntity> Select();

        /// <summary>
        /// 查询一条数据
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        TEntity SelectFirstById(object id);
    }
}
